#include "stdafx.h"
#include "Tests.h"

TEST_F(TestWMReaderDllUtils, StringWithSlash)
{
    std::wstring keyPath = L"HKEY_LOCAL_MACHINE\\init";
    std::wstring preDefKey = L"";
    std::wstring subKey = L"";
    
    WMReaderDllUtils::SplitKeyPath(keyPath, preDefKey, subKey);
    EXPECT_EQ(L"HKEY_LOCAL_MACHINE", preDefKey);
    EXPECT_EQ(L"init", subKey);
}

TEST_F(TestWMReaderDllUtils, StringWithoutSlash)
{
    std::wstring keyPath = L"HKEY_LOCAL_MACHINE";
    std::wstring preDefKey = L"";
    std::wstring subKey = L"";

    WMReaderDllUtils::SplitKeyPath(keyPath, preDefKey, subKey);
    EXPECT_EQ(L"HKEY_LOCAL_MACHINE", preDefKey);
    EXPECT_EQ(L"", subKey);
}

int main(int argc, char *argv[])
{
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}